<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app-4">
    <ol>
        <li v-for="(todo,index) in todos"><!--意思就是说从items遍历出每一项叫做item,相当于增强for（IDEA中的iter）-->
            {{todo.text}}------{{index}}
        </li>
    </ol>
</div>

<script src="../lib/vue.js"></script>
<script>
    var app4 = new Vue({
        el: "#app-4",
        data: {
            todos: [
                { text: '学习 JavaScript'},
                { text: '学习 Vue'},
                { text: '整个牛项目'}
            ]
        }
    })
</script>
</body>
</html>